package com.p2p.system.entity;

import com.alibaba.fastjson.JSONObject;
import com.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.request.AlipayTradePagePayRequest;
import com.p2p.system.config.AliPayConfig;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

/**
 * @Date：2023/12/11
 * @Author：lyd
 */
@Data
@Component
public class Alipay {
    /**
     * 应用编号
     */
    @Value("${alipay.appId}")
    private String appId;
    /**
     * 应用私钥
     */
    @Value("${alipay.appPrivateKey}")
    private String appPrivateKey;
    /**
     * 阿里公钥
     */
    @Value("${alipay.alipayPublicKey}")
    private String alipayPublicKey;
    /**
     * 阿里调用我们的地址【内网穿透】
     */
    @Value("${alipay.notifyUrl}")
    private String notifyUrl;
    /**
     * 支付完成后，页面跳转的地址
     */
    @Value("${alipay.returnUrl}")
    private String returnUrl;
}